var express=require('express');
var app=express();

app.use(express.static('public'));

app.get('/',function(req,res)
{
    console.log('it is main get');
    res.send('Hello  GET');
});


app.post('/',function(req,res)
{
    console.log('it is main post');
    res.send('Hello POST');
});

app.get('/del_user',function(req,res)
{
    console.log('it is /del_user get');
    res.send('删除页面');
});

app.get('/list_user',function(req,res)
{
    console.log('it is /list_user get');
    res.send('用户列表页面');
});

app.get('/ab*cd',function(req,res)
{
    console.log('it is /ab*cd get');
    res.send('正则匹配');
});


var server=app.listen(8888,function()
{
    var host=server.address().address;
    var port=server.address().port;
    console.log("应用实例，访问地址为 http://%s:%s", host, port)

});
